﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web.Mvc;
using System.Collections.Generic;
using NerdDinner.Controllers;

namespace NerdDinner.Models
{
    [Bind(Include = "Result, BookName")]
    [MetadataType(typeof(TwitterResults_Validation))]
    public partial class TwitterResults
    {
        public List<TwitterData> Result { get; set; }
        public string BookName { get; set; }
    }

    public class TwitterResults_Validation
    {
        [HiddenInput(DisplayValue = false)]
        public List<TwitterData> Result { get; set; }

        [Required(ErrorMessage = "Title is required")]
        [StringLength(50, ErrorMessage = "Title may not be longer than 50 characters")]
        public string BookName { get; set; }  
    }
}